package com.itheima.reggie.common;

import com.itheima.reggie.domain.Employee;

public class EmployeeHolder {

    //创建一个ThreadLocal对象
    private static ThreadLocal<Employee> th = new ThreadLocal();


    //放入
    public static void set(Employee employee) {
        th.set(employee);
    }

    //获取
    public static Employee get() {
        return th.get();
    }

    //移除
    public static void remove() {
        th.remove();
    }
}
